﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Person : Interface1,IBehavior
    {
        public string Name { get; set; }
        public int Age { get; set; }
        public string Sex { get; set; }     //隐式实现接口

        void IBehavior.Walk()        //显示实现接口
        {
            Console.WriteLine("行走");
        }


        void Interface1.Print()
        {
            Console.WriteLine("显示接口实现");
        }
        
    }


    class Teacher :Person,IWorker
    {
        double IWorker.Sal { get; set; }         //显示实现接口
        double IWorker.WorkYear { get; set; }    //显示实现接口
    }
}
